﻿@extends('wechat.layouts.base')
@section("js_files")
    <script src="http://www.ebama.net/data/attachment/js/index/build.js"></script>
    <script src="http://www.ebama.net/data/attachment/js/share_file.js"></script>
@endsection
@section('content')
	<div class="wrap">
            <h4>奖品展示</h4>
            <div class="wrapCon">
                @if(count($data['prize']))
                    @foreach($data['prize'] as $row)
                        <div class="star">
                            <span class="btnShow"><img src="{{$row->attach->path}}"></span>
                            <div class="detail">
                                <div class="weui-panel weui-panel_access">
                                    <div class="weui-panel__bd">
                                        <div class="weui-media-box weui-media-box_text">
                                            <h4 class="weui-media-box__title">{{$row->name}}</h4>
                                            <p class="weui-media-box__desc">{{$row->info}}</p>
                                            @if($row->id == 5)
                                                <img style="width:100px;height:100px;margin:0 35%;" src="https://oj7j4hqh8.qnssl.com/uploads/ueditor/php/upload/image/20170103/1483436068498477.jpeg"/>
                                                @endif
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                     @endforeach
                @else
                     <p class="nothing"> 暂无数据</p>
                @endif
            </div>
			<!--
            <div class="weui-panel weui-panel_access">
                <div class="weui-panel__hd hj">获奖人数<span>{{$data['prize_count']}}</span></div>
                <div class="weui-panel__bd">
                </div>
            </div>
			-->
    </div>
    <script>
        $(function(){
            $(".btnShow").click(function(){
                var show_list = $(this).siblings(".detail");
                show_list.toggleClass("show");
                $(this).parent(".star").siblings().find(".detail").removeClass("show");
            })
            $('.gun').css('height','115px');
            $('.gun li').css('height','35px');
        });
    </script>
 @endsection